<template>
  <div id="home">
    <!-- <h1>{{ $t('footer.home') }}</h1> -->
    <!-- <Swipe class="my-swipe" :autoplay="5000" indicator-color="white">
      <SwipeItem class="van-swipe-item" v-for="image in images" :key="image">
        <img :src="image" />
      </SwipeItem>
    </Swipe> -->

    <Sticky class="sign_up">
      <span @click="sginup" to="/signup">{{$t("footer.baoming")}}</span>
    </Sticky>

    <div class="intro springish">
<!--      <span class="cut_lang" @click="cut_lang">中文/EN</span>-->
      <img src="../../static/img/back_end.png" />
      <div>{{$t('footer.title')}}<span style="color: #2082fd;font-size: 14px;line-height: 18px" @click="cut_lang">中文/EN</span></div>
      <div >{{$t('footer.subtitle')}}</div>
      <div style="line-height: 20px;font-size: 14px;" v-html="$t('footer.intro')"></div>
    </div>



    <div class="honor">
      <div>荣誉</div>
      <div>仅摘取近期部分荣誉展示</div>
      <div>
        <div>
          <img src="../../static/img/r1.png" alt="">
          <div>
            <div></div>
            <div>”星空小屋-基于微服务的分布式社区服务平台“项目，荣获2021年安徽省大学生设计大赛，软件应用与开发->Web应用与开发省赛一等奖。</div>
          </div>
        </div>
        <div>
          <img src="../../static/img/r2.png" alt="">
          <div>
            <div></div>
            <div>”畅行顺风车-一站式解决方案“项目，荣获2021年安徽省大学生设计大赛，软件应用与开发->移动应用与开发省赛一等奖。</div>
          </div>
        </div>
        <div>
          <img src="../../static/img/r3.png" alt="">
          <div>
            <div></div>
            <div>”逃之夭夭-金秋果核订购商场“项目，荣获2021年安徽省大学生设计大赛，软件应用与开发->Web应用与开发省赛三等奖。</div>
          </div>
        </div>
        <div>
          <img src="../../static/img/r1.png" alt="">
          <div>
            <div></div>
            <div>“大魔王秒杀商城”荣获第10届“中国软件杯”大学生设计大赛国赛三等奖</div>
          </div>
        </div>
        <div>
          <img src="../../static/img/r2.png" alt="">
          <div>
            <div></div>
            <div>“Summer商城”荣获第10届“中国软件杯”大学生设计大赛国赛三等奖</div>
          </div>
        </div>
        <div>
          <img src="../../static/img/r3.png" alt="">
          <div>
            <div></div>
            <div>“三个和尚秒杀商城”荣获第10届“中国软件杯”大学生设计大赛国赛三等奖</div>
          </div>
        </div>
      </div>
    </div>



    <div class="route" style="padding-top: 15px">
      <Route v-for="item of routeObjs" :route-obj="item" :key="item.title"/>
    </div>

    <div style="width: 100%;">
      <employment-direction></employment-direction>
    </div>

    <!--  项目开发流程  -->
    <div class="process">
      <img src="https://xk857.com/blog/2021/01/koa.png">
    </div>


    <!--  集训队环境  -->
    <EnvironmentalPhotos/>

    <div class="graduate">
      <div>历届优秀毕业生</div>
      <div>以服务社会为己任，为建设社会主义和谐社会贡献力量</div>
      <div>
        <div>
          <img src="../../static/img/bys1.jpg" alt="">
          <div>就业之星代表：2012届软件班 薛山山，软件开发高级工程师 薪资：18K（1.8万元/月）</div>
        </div>
        <div>
          <img src="../../static/img/bys2.jpg" alt="">
          <div>就业之星代表：2013届软件班 时培恩，软件开发高级工程师，薪资18K（1.8万元/月）</div>
        </div>
        <div>
          <img src="../../static/img/bys3.png" alt="">
          <div>就业之星代表：2013届软件班 杨梦，软件开发高级工程师，薪资19K（1.9万元/月）</div>
        </div>
        <div>
          <img src="../../static/img/bys4.jpg" alt="">
          <div>就业之星代表：2014届软件班 王建观，软件开发高级工程师，薪资20K（2.0万元/月）</div>
        </div>
        <div>
          <img src="../../static/img/bys5.jpg" alt="">
          <div>就业之星代表：2015届软件班 李怀鑫，软件开发高级工程师，薪资：25K（2.5万元/月）</div>
        </div>
        <div  style="margin-bottom: 30px">
          <img src="../../static/img/bys6.jpg" alt="">
          <div>就业之星代表：2016届软件班 孙金芳，Web前端开发工程师，薪资：18K（1.8万元/月）</div>
        </div>
      </div>
    </div>

    <!-- 报名列表 -->
    <div v-if="this.newCount>=5" style="background:#2a2080;text-align: center;margin-top: 20px">
      <img style="width: 80%;margin-top: 10px;" src="../../static/img/mingdan_title.png" alt="">
    </div>
    <RegistrationList v-if="this.newCount>=5" :newData="newData"></RegistrationList>


    <div class="qr">
      <div>想要了解更多？</div>
      <div>QQ加群了解详情</div>
      <div>
        <img src="https://oss.yhuayi.com/my_self/image/qrcode_1631094191983.jpg" alt="">
        <div>集训队招新咨询群：640018991</div>
      </div>
      <div>©2008-2021 滁州职业技术学院集训队</div>
    </div>
  </div>
</template>

<script>
import {
  // Swipe,
  // SwipeItem,
  Sticky,
} from 'vant';

import instance from '@/network/request'
// import Direction from "@/components/home/Direction";
import RegistrationList from "@/components/home/RegistrationList.vue";
import Route from "@/components/home/route/Route";
import EmploymentDirection from "@/components/home/EmploymentDirection";
import EnvironmentalPhotos from "@/components/home/EnvironmentalPhotos";


export default {
  name: 'Home',
  components:{
    Route,
	  RegistrationList,
    EmploymentDirection,
    EnvironmentalPhotos,
    Sticky,
  },
  data(){
    return{
      images:[
        'https://oss.yhuayi.com/my_self/image/cat.jpg',
        'https://oss.yhuayi.com/my_self/image/1595330904359.jpg',
        'https://oss.yhuayi.com/my_self/image/1595330723334.jpg',
      ],
      isShow:false,
      studentReq:{},
      newCount:0,
      newData:[],
      routeObjs:[
        {title:"带你走进编程大门",info:"0基础入门软件开发行业，结合个人优势，让你从编程小白到开发大神的华丽转变。"},
        {title:"实战编程能力",info:"小项目巩固基础开发能力，最终团队设计开发大型项目，全面对标企业实际需求。"},
        {title:"多维度竞赛提升",info:"指导老师与集训队学长学姐带队参赛，巩固提升开发能力，以赛试兵良性循环。"},
        {title:"实习指导与自我提升",info:"多年毕业学长学姐的实际开发与经验分享，集训队在校同学技术指导，解决技术性难题。"},
      ]
    }
  },
  methods:{
    chinese(){
      //中文
      this._i18n.locale="zh";
      localStorage.setItem('lang', 'zh');
    },
    english(){
      console.log("切2换")
      console.log(this)
      //英文
      this._i18n.locale="en";
      localStorage.setItem('lang', 'en');
    },
    sginup(){
      //跳转到报名页面
      this.$router.push("/signup");
    },
    cut_lang:function(){
      console.log("切换")
      if(this._i18n.locale == "en"){
        this.chinese()
      }else{
        this.english()
      }
    }
  },
  created() {
    instance.get("/api/v1/student/list").then((value)=>{
		this.newCount=value.data.data.length;
    console.log(this.newCount);
		for(var i = 0; i < value.data.data.length; i++){
			value.data.data[i].index = i;
			var xing = "";
			for(var j = 0; j < value.data.data[i].realName.length - 1; j++){
				xing += "*";
			}
			value.data.data[i].realName = value.data.data[i].realName[0] + xing;
		}
      this.newData=value.data.data;
    }).catch((error)=>{
      console.log(error);
    })
  }
}
</script>

<style scoped>
.van-swipe-item img{
  width: 100%;
  height: 100%;
}
/*中文切换按钮*/
.cut_lang{
  position:absolute;
  top:10px;
  right:10px;
  color: #000;
  font-size: 13px;
  font-weight: bold;
  background-color: rgba(0,0,0,.2);
  padding: 7px 10px;
  border: 0.5px solid rgba(255,255,255,.7);
}
/*报名按钮*/
.sign_up span{
  /* outline: none; */
  /* border: 1px solid #bbbbbb;
  border-right: unset; */
  font-size: 14px;
  background: red;
  color: white;
  text-align: center;
  -webkit-writing-mode: vertical;/* -rl;
  writing-mode: vertical-rl; */
  width: 100px;
  height: 40px;
  line-height: 40px;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
  right: 0;
  bottom: 10%;
  box-shadow: 0 4px 5px #e2e2e2;
  position: fixed;
  z-index:100
}

/*模态框部分*/
.wrapper {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  top: 50%;
  transform: translateY(-50%);
}
/*真实项目开发*/
.process{
  width: 100%;
}
.process img{
  width: 100%;
}

.block {
  background-color: #fff;
}
.bg_item{
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-position: center 0;
  background-size: 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  object-fit: fill;
}
.intro {
  width: 100%;
  /*margin-left: 2%;*/
  /*border-radius: 15px;*/
  padding: 20px 10px;
  box-sizing: border-box;
  background: white;
}
.intro > div:nth-of-type(1) {
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  font-family: 宋体;
}
.intro > div:nth-of-type(2) {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-top: 20px;
  font-family: 宋体;
}
.intro > div:nth-of-type(3) {
  font-size: 17px;
  margin-top: 20px;
  text-indent:2em;

}
.intro > img {
  width: 80px;
  text-align: center;
  margin-left: calc(50% - 40px);
}
#home {
  background: #f2f2f4;
}
.title {
  text-align: center;
  font-size: 18px;
  background: white;
  height: 40px;
  line-height: 40px;
}
@keyframes springish {
  0% {transform: translate3d(0, 0, 0) scale(0);}
  25% {transform: translate3d(0, 100px, 0) scale(0);}
  350% {transform: translate3d(0, 0, 0) scale(1);}
  50% {transform: translate3d(0, 75px, 0) scale(1);}
  60% {transform: translate3d(0, 0, 0) scale(1);}
  70% {transform: translate3d(0, 50px, 0) scale(1);}
  80% {transform: translate3d(0, 0, 0) scale(1);}
  90% {transform: translate3d(0, 25px, 0) scale(1);}
  100% {transform: translate3d(0, 0, 0) scale(1);}
}
.springish {
  animation: springish;
  animation-iteration-count:initial;
  animation-duration: 1s;
  animation-timing-function: linear;
}
.honor {
  width: 80%;
  margin-left: 10%;
  text-align: center;
  margin-top: 60px;
  padding-bottom: 30px;
}
.honor > div:nth-of-type(1) {
  font-size: 26px;
  font-weight: bold;
}
.honor > div:nth-of-type(2) {
  font-size: 15px;
  margin-top: 20px;
}
.honor > div:nth-of-type(3) > div {
  width: 100%;
  margin-top: 60px;
}
.honor > div:nth-of-type(3) > div img {
  width: 20%;
  display: inline-block;
  vertical-align: middle;
}
.honor > div:nth-of-type(3) > div > div {
  width: 80%;
  display: inline-block;
  vertical-align: middle;
  font-size: 15px;
}
.honor > div:nth-of-type(3) > div > div > div{
  text-align: left;
  margin-left: 15px;
}

.graduate {
  margin-top: 60px;
  text-align: center;
}
.graduate > div:nth-of-type(1){
  font-size: 26px;
  font-weight: bold;
}
.graduate > div:nth-of-type(2){
  font-size: 16px;
  margin-top: 20px;
}
.graduate > div:nth-of-type(3){
  width: 80%;
  margin-left: 10%;
  margin-top: 60px;
}
.graduate > div:nth-of-type(3) > div{
  background: white;
  box-shadow: 0 0 20px #dedede;
  margin-top: 40px;
  border-radius: 10px;
  overflow: hidden;
}
.graduate > div:nth-of-type(3) > div img{
  width:100%
}
.graduate > div:nth-of-type(3) > div > div{
  width:100%;
  padding: 10px;
  box-sizing: border-box;
}
.qr {
  background: #001529;
  text-align: center;
  color: white;
  padding-bottom: 20px;
  padding-top: 20px;
  box-sizing: border-box;
}
.qr > div:nth-of-type(1) {
  font-size: 26px;
  font-weight: bold;
  margin-top: 60px;
}
.qr > div:nth-of-type(2) {
  font-size: 16px;
  margin-top: 20px;
}
.qr > div:nth-of-type(3) {
  margin-top: 40px;
}
.qr > div:nth-of-type(3) > img {
  width: 80%;
}
.qr > div:nth-of-type(3) > div {
  margin: 40px 0;
}
.route{
  background: #f9fafc;
}
</style>